package org.stvd.service.workflow.leave;
 
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.stvd.common.utils.ServiceResult;
import org.stvd.core.dto.QueryResult;
import org.stvd.entities.workflow.WfIndex;
import org.stvd.entities.workflow.leave.BsLeaveInfo;
import org.stvd.service.base.BaseService;
 
/**
 * @Title BsLeaveInfoService
 * @Destribution:请假信息业务层接口类
 * @author fenglong
 * @date 2020年11月2日
 */
public interface BsLeaveInfoService extends BaseService<BsLeaveInfo> {
    
    /**
     * @Destribution:考勤信息管理查询方法
     * @param i
     * @param pageSize
     * @param depName
     * @param empName
     * @param attendDate
     * @return
     */
    QueryResult<Map<String, Object>> getQueryResult(int i, Integer pageSize, 
        String depName, String empName, Date startDate, Date endDate, String userId);
 
    /**
     * @Destribution:请假信息新增
     * @param bsLeaveInfo
     * @param wfIndex
     * @return
     */
    ServiceResult<Map<String, Object>> insertLeaveInfo(BsLeaveInfo bsLeaveInfo, WfIndex wfIndex,
            Map<String, Object> variables);
 
    /**
     * @Destribution:删除请假信息
     * @param processInstanceId
     * @return
     */
    ServiceResult<Map<String, Object>> deleteLeaveInfo(String processInstanceId);
 
    /**
     * @Destribution:通过流程id查询请假信息
     * @param processInstanceId
     * @return
     */
    BsLeaveInfo findByProcessId(String processInstanceId);
 
    /**
     * @Destribution:查询请假申请集合（sql）
     * @param i
     * @param pageSize
     * @param auditStatus
     * @return
     */
    QueryResult<Map<String, Object>> queryLeaveApproResult(int i, Integer pageSize, String auditStatus,String uid);
 
    /**
     * @Destribution 请假审批签收
     * @param processInstanceId 流程实例ID
     * @return
     */
    ServiceResult<Map<String, Object>> claimLeave(String processInstanceId);
 
    /**
     * @Destribution:请假申请审批
     * @param processInstanceId
     * @param variables
     * @return
     */
    ServiceResult<Map<String, Object>> approveLeave(String processInstanceId, Map<String, Object> variables);
 
    /**
     * @Destribution:驳回
     * @param processInstanceId
     * @param variables
     * @return
     */
    ServiceResult<Map<String, Object>> refuseLeave(String processInstanceId,String jumpTaskKey, Map<String, Object> variables);
 
    /**
     * @param nowDate
     * @param userId
     * @Destribution:
     * @return
     */
    List<BsLeaveInfo> NowisLeave(String userId, Date nowDate);
 
    List<BsLeaveInfo> findBySendUid(String currentUserid, String auditStatus);
    
    /**
     * @Destribution:修改
     * @param bsLeaveInfo
     * @return
     */
    ServiceResult<Map<String, Object>> editBsLeaveInfo(BsLeaveInfo bsLeaveInfo);
   
    /**
     * @Destribution:撤销
     * @param processInstanceId
     * @return
     */
    ServiceResult<Map<String, Object>> revoke(String processInstanceId);
 
}